package br.com.turma14.model.service;


import br.com.turma14.model.dao.CustomerDao;
import br.com.turma14.model.entity.Customer;


public class CustomerService {

	private CustomerDao dao;

	public CustomerService() {
		dao = new CustomerDao();
	}
	
	public void save (Customer customer) {
		
		if (customer.getId() == 0) {
			dao.insert(customer);
		} else {
			dao.update(customer);
		}
		
	}
	
	
	
}
